let mainData = [];
let nameSix = ["胜利场数", "总击杀", "累计插眼", "KDA", "MVP", "对位经济差"];
mainData.push({
  name: nameSix[0],
  value: [],
  hismax: 30,
});
mainData.push({
  name: nameSix[1],
  value: [],
  hismax: 1000,
});
mainData.push({
  name: nameSix[2],
  value: [],
  hismax: 200,
});
mainData.push({
  name: nameSix[3],
  value: [],
  hismax: 20,
});
mainData.push({
  name: nameSix[4],
  value: [],
  hismax: 30,
});
mainData.push({
  name: nameSix[5],
  value: [],
  hismax: 3000,
});

function createSeries(mainData) {
  let result = [];
  let insideLabel = {
    normal: {
      position: "center",
      textStyle: {
        fontStyle: "normal",
        fontWeight: "normal",
        fontSize: 0.8 + "vw",
      },
    },
  };

  let itemOthers = {
    normal: {
      color: "#ccc",
    },
  };
  for (let i = 0; i < mainData.length; i++) {
    result.push({
      type: "pie",
      center: [i * 16.6 + 8 + "%", "50%"],
      radius: ["72%", "85%"],
      label: insideLabel,
      data: [
        {
          name: mainData[i].name,
          value: mainData[i].hismax - mainData[i].value,
          itemStyle: itemOthers,
        },
        {
          name: mainData[i].name,
          value: mainData[i].value,
        },
      ],
    });
  }
  return result;
}
let option = {
  tooltip:{
    show:true
  },
  series: createSeries(mainData),
};

export {option}
